Release 10.1A: OpenEdge Development:
Progress 4GL Reference
DEFINE RECTANGLE statement
Defines a rectangle widget for use in the current procedure.
Note: Does not apply to SpeedScript programming.Syntax
[ PRIVATE ] RECTANGLErectangleDefines and identifies a rectangle widget as a data member for a class, and optionally specifies an access mode for that data member. Do not specify the access mode when defining a rectangle widget for a method within a class.
PRIVATE data members can be accessed only by the defining class. The default access mode is PRIVATE.
Note: This option is applicable only when defining a data member for a class in a class definition (.cls) file.RECTANGLErectangleIdentifies the name of the rectangle widget you are defining. You can define the rectangle widget in a procedure or a method within a class.
LIKErectangle2Specifies a previously defined rectangle whose characteristics you want to apply to the new rectangle. If you name a rectangle with this option, you must have defined that rectangle previously in the procedure.
NO-FILLIndicates that only the outline of the rectangle should be drawn. By default, the rectangle is filled with the background color.
EDGE-CHARSwidthSpecifies the width of the rectangle outline in characters. The default width is 1. If you do not want an edge on the rectangle, specify EDGE-CHARS 0.
EDGE-PIXELSwidthSpecifies the width of the rectangle outline in pixels. The default width is 1. If you do not want an edge on the rectangle, specify EDGE-PIXELS 0.
DCOLORexpressionSpecifies the fill color of the rectangle in character interfaces. This option is ignored in graphical interfaces.
BGCOLORexpressionSpecifies the background color or fill color of the rectangle in graphical interfaces. This option is ignored in character interfaces.
FGCOLORexpressionSpecifies the foreground color or edge color of the rectangle in graphical interfaces. This option is ignored in character interfaces.
GRAPHIC-EDGESpecifies that in a character interface, the rectangle is drawn with graphic characters. This option is ignored in a graphical interface. This overrides the EDGE-CHARS and EDGE-PIXELS options. The border is one graphic unit thick.
PFCOLORexpressionSpecifies the edge color of the rectangle in character interfaces. This option is ignored in graphical interfaces. It is also ignored if you specify GRAPHIC-EDGE.
size-phraseSpecifies the outside dimensions of the rectangle widget. This is the syntax for
size-phrase:
If you specify SIZE or SIZE-CHARS, the units are characters; if you specify SIZE-PIXELS, the units are pixels. For character units, the values
widthandheightmust be decimal constants. For pixels units, they must be integer constants. For more information, see the SIZE phrase reference entry.TOOLTIPtooltipAllows you to define a help text message for a rectangle widget. Progress automatically displays this text when the user pauses the mouse button over the rectangle widget.
You can add or change the TOOLTIP option at any time. If TOOLTIP is set to "" or the Unknown value (
?), then the ToolTip is removed. No ToolTip is the default. The TOOLTIP option is supported in Windows only.trigger-phraseSpecifies application triggers for the rectangle.
For more information, see the Trigger phrase reference entry.
ExampleThe following example uses a set of thin rectangles as lines to create graphic columns within a frame background:
Notes
- To create the static rectangle you are defining, you must define a static frame that contains the rectangle. Each frame you define that contains the same rectangle creates an additional instance of that rectangle. The widget handle for a static rectangle is not available until the rectangle is created.
- You can specify an application-defined widget ID for a static rectangle widget using the
form-itemphrase in either the FORM statement or the DEFINE FRAME statement. See the FORM statement and DEFINE FRAME statement reference entries for more information.- When defining a rectangle, you must specify either the LIKE option or the size phrase.
See also
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |